]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellEntry: Make the entry have a fake focus state when a context menu is open
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 6 Sep 2012 19:35:54 +0000 (16:35 -0300)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 12 Sep 2012 17:15:18 +0000 (14:15 -0300)
This means that right-clicking on an entry shouldn't visibly change the theme,
which is unexpected. Make sure that closing the menu refocused the entry, too.

https://bugzilla.gnome.org/show_bug.cgi?id=683509

js/ui/shellEntry.js

index b82bc46e4ca226bd1830521f0e88b5c3b6be6d63..18fe7d19970fc7e8036adeefd46848cd9eef28a7 100644 (file)
@@ -76,6 +76,12 @@ const EntryMenu = new Lang.Class({
             this.actor.grab_key_focus();
 
         this.parent();
+        this._entry.add_style_pseudo_class('focus');
+    },
+
+    close: function() {
+        this._entry.grab_key_focus();
+        this.parent();
     },
 
     _updateCopyItem: function() {